package com.blog.util;

import java.util.Map;

import org.springframework.ui.Model;

public class ErrorMsg {
	public static final String successTrue = "操作成功";
	public static final String successFalse = "操作失败";
	public static final String iamgeCode="验证码错误";
	public static final String Error_0="获取提交数据错误";
	
	
	//以model对象返回
	public static void successTrue(Model model) {
		model.addAttribute("success", true);
		model.addAttribute("errorInfo", successTrue);
	}
	public static void successFalse(Model model, String errorInfo) {
		model.addAttribute("success", false);
		model.addAttribute("errorInfo", errorInfo);
	}
	//以map对象返回
	public static void successTrue(Map map) {
		map.put("success", true);
		map.put("errorInfo", successTrue);
	}
	public static void successFalse(Map map, String errorInfo) {
		map.put("success", false);
		map.put("errorInfo", errorInfo);
	}
}
